package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.regionvo.RegionVO;
import com.cskaoyan.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 创建日期: 2022/05/06 14:22
 *
 * @author shuyang
 */
@RestController
@RequestMapping("admin")
public class RegionController {
    @Autowired
    RegionService regionService;

    @GetMapping("region/list")
    public BaseRespVo<RegionVO> queryRegionList() {
        RegionVO regionVO = regionService.selectRegions();
        return BaseRespVo.ok(regionVO);
    }
}
